//系统必须接口
import axios from '@/api/service.js';
import api from '@/pub/unit_api.js';
//api 统一控制api前缀
var base_url = api.api.system;
export default {
  //首页服务器信息
  querySystemInfo:()=>{
    return axios.post(base_url + '/system/systemHardwareInformation');
  },
  //字典查询
  getYuIcon: () => {
    return axios.get('@/iconfont.json');
  },

  //获取图标
  getVoIcon: () => {
    axios.get("./iconfont.json").then(res =>{
      console.log(res)
    })
    return axios.get("./iconfont.json");
  },

  //获取api操作日志
  queryApiLog: param => {
    return axios.post(base_url + '/sys-log/queryApiLog', param);
  },
  //登录日志
  queryLoginLog: param => {
    return axios.post(base_url + '/sys-log/queryLoginLog', param);
  },
  //日志设置查询
  querySysLogSet: param => {
    return axios.post(base_url + '/sys-log/querySysLogSet', param);
  },
  //日志设置查修改
  saveSysLogSet: param => {
    return axios.post(base_url + '/sys-log/saveSysLogSet', param);
  },
  //日志设置同步
  syncSysLogSet: param => {
    return axios.post(base_url + '/sys-log/syncSysLogSet', param);
  },
  //日志设置删除
  delSysLogSet: param => {
    return axios.post(base_url + '/sys-log/delSysLogSet', param);
  },
  //获取天气信息
  queryWeather: param => {
    return axios.post(base_url + '/open-system/weather', param);
  },
  //城市获取下拉
  querySysCity: () => {
    return axios.post(base_url + '/open-system/querySysCity');
  },
  //任务分组编辑
  editSysTaskGroup: param => {
    return axios.post(base_url + '/sys-task/editSysTaskGroup', param);
  },
  //分组查询
  getSysTaskGroupDict: () => {
    return axios.post(base_url + '/sys-task/getSysTaskGroupDict');
  },
  //定时任务编辑
  editSysTask: param => {
    return axios.post(base_url + '/sys-task/editSysTask', param);
  },
  //定时任务查询
  querySysTask: param => {
    return axios.post(base_url + '/sys-task/querySysTask', param);
  },
  //定时任务启动
  startSysTask: param => {
    return axios.post(base_url + '/sys-task/addjob', param);
  },
  //定时任务停止
  stopSysTask: param => {
    return axios.post(base_url + '/sys-task/pausejob', param);
  },
  //用户登录
  userLogin: param => {
    return axios.post(base_url + '/sys-user/userLogin', param);
  },
  //消息队列查询
  querySysMqConfig: param => {
    return axios.post(base_url + '/mqConfig/querySysMqConfig', param);
  },
  //redis 缓存查询
  queryRedisKeys: param => {
    return axios.post(base_url + '/sys-data/queryRedisKeys', param);
  },
  //redis 缓存key查询
  queryRedisKeysByType: param => {
    return axios.post(base_url + '/sys-data/queryRedisKeysByType', param);
  },
  //保存公告通知
  saveNotice: param => {
    return axios.post(base_url + '/system/saveNotice', param);
  },
  //保存公告通知
  queryNotice: param => {
    return axios.post(base_url + '/system/queryNotice', param);
  },
  //redis 信息查询
  queryRedisInfo: () => {
    return axios.post(base_url + '/redis/queryRedisInfo'); 
  },
  //系统参数查询
  querySysParams: params => {
    return axios.post(base_url + '/system/querySysConfirm', params);
  }
};
